package inter_home;

/**
 * @classname:Rectangle
 * @description:
 * @author: Mr.Z
 * @date: 2020/12/3 21:08
 * @version: 0.1
 * @since:1.8
 */
public class Rectangle extends Graph {
    public Rectangle(double high, double width) {
        this.high = high;
        this.width = width;
    }

    private double high;
    private double width;

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public double getHigh() {
        return high;
    }

    public void setHigh(double high) {
        this.high = high;
    }

    @Override
    public double area() {
        return high*width;
    }

    @Override
    public double peri() {
        return 2*(high+width);
    }
}
